package com.sy.simpleegg.platform.kkb.network.errorhandler

import io.reactivex.Observable
import io.reactivex.functions.Function

/**
 * @author sy
 * @date 2024/10/11 15:10
 * @desc
 */
class HttpErrorHandler<T>: Function<Throwable, Observable<T>> {
    fun HttpErrorHandler() {}

    override fun apply(t: Throwable): Observable<T> {
        return Observable.error(ExceptionHandle.handleException(t))
    }
}